# coding=utf-8
"""
作者：董新强 
创建时间：
描述：
"""
from db_models.admin import Admin
from framework.db_session import DbSession

__admin_uids__ = set()

with DbSession.create() as db:
    for u in db.query(Admin.uid):
        __admin_uids__.add(u[0])


def is_admin(uid):
    '''
    是否是管理员
    :param uid:
    :return:
    '''
    return uid in __admin_uids__
